package com.demo;

import com.ycproxy.YcClassLoader;
import com.ycproxy.YcJdkProxy;

public class Test {
    public static void main(String[] args) {
        YcJdkProxy ycJdkProxy = new YcJdkProxy();
        OrderBizImpl orderBiz = new OrderBizImpl();
        CheckRightsInvocationHandler handler = new CheckRightsInvocationHandler(orderBiz);
        OrderBiz o = (OrderBiz) ycJdkProxy.newProxyInstance(
                new YcClassLoader(),
                orderBiz.getClass().getInterfaces(),
                handler);
        o.saveOrder(1);
    }
}
